/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.suli.toHouse.service;

import me.zhengjie.suli.toHouse.domain.Receipt;
import me.zhengjie.suli.toHouse.domain.ReceiptDetail;
import me.zhengjie.suli.toHouse.service.dto.ReceiptDto;
import me.zhengjie.suli.toHouse.service.dto.ReceiptQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @website https://eladmin.vip
* @description 服务接口
* @author WYH
* @date 2024-02-01
**/
public interface ReceiptService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(ReceiptQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<ReceiptDto>
    */
    List<ReceiptDto> queryAll(ReceiptQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return ReceiptDto
     */
    ReceiptDto findById(String id);

    /**
    * 创建
    * @param resources /
    * @return ReceiptDto
    */
    ReceiptDto create(Receipt resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(Receipt resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(String[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<ReceiptDto> all, HttpServletResponse response) throws IOException;

    /**
     * 推送采购入库单号至sccs
     * @param param
     * @return
     */
    String pushSccs(String param);

    /**
     * 接收sccs传输的采购入库单
     * @param param
     * @return
     */
    String procureReceipt(String param);

    /**
     * 接收sccs传输的客户退货单据
     * @param param
     * @return
     */
    String customerReturn(String param);

    int queryReceipt(String poCode);

    int receiveToRCV(String poCode);

    int zuPanConfirm(String parma);

    int rePushSccs(String parma);

    ResponseEntity<Object> emptyReturnWarehouse(String param);

    int chuShiHua(String param);

    String getTrayCode();

    String procureCostCenterToHouse(String param);

    int emptyBoxHuiKu(String param);

    List<ReceiptDetail> selectReceiptById(String param);

    List<Map<String, Object>> getReceiptDetailInfo(String param);

    int sendPOCode(String param);

    int receiveBoxNumberFromPDA(String param);
}